home *** CD-ROM | disk | FTP | other *** search
- Path: solon.com!not-for-mail
- From: ghenniga@ampere.NMSU.Edu (Gary Hennigan)
- Newsgroups: comp.lang.c.moderated,comp.lang.c
- Subject: Re: Test for infinity?
- Followup-To: comp.lang.c
- Date: 22 Feb 1996 18:14:33 -0600
- Organization: New Mexico State University - Electromagnetics Group
- Sender: clc@solutions.solon.com
- Approved: clc@solutions.solon.com
- Message-ID: <4gj0t9$lr4@solutions.solon.com>
- References: <4gfci8$2jd@solutions.solon.com>
- Reply-To: ghenniga@NMSU.Edu
- NNTP-Posting-Host: solutions.solon.com
- X-Newsreader: Gnus v5.1
-
- In an article "John J. Har" <johnhar@aimnet.aimnet.com> wrote:
- >Is there any ANSI function or code snippet that would test a double for
- >(positive) infinity? For that matter, how about for denormals and NaN's?
-
- Take a look at the fp_class_d() and fp_class_f() functions. I don't
- know how well they travel across platforms but they are listed under
- ANSI/IEEE Std 754-1985 and seem to be present on Suns and SGIs.
-
- [Not ANSI C, and not on any of my platforms, but IEEE is close enough.
- Anyone trying to discuss details of IEEE here will be thrown to
- talk.bizarre. -mod]
-
- Gary
- (ghenniga@NMSU.Edu)
-